package cn.zqgx.moniter.center.lzmedia.service;

import cn.hutool.http.HttpUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class ApiService {

    @Value("${lzmedia.server.secret}")
    private String secret;

    @Value("${lzmedia.server.url}")
    private String url;

    @Value("${lzmedia.server.api_getAiList}")
    private String api_getAiList;

    /**
     * 获取api 列表
     * @return
     */
    public String getAiList() {

        String psotUrl = url + api_getAiList + "?secret=" + secret;
        log.info("请求api 列表地址：" +  psotUrl);

        String body = HttpUtil.post(psotUrl , "");
        log.info("请求api 列表地址 返回数据：" +  body);
        return body;
    }




}
